﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Meraz.Core.Model;

namespace Meraz.Core.Comparers
{
    public class MemberKeyComparer : IEqualityComparer<Member>
    {
        #region IEqualityComparer<Member> Members

        public bool Equals(Member x, Member y)
        {
            return x.ProviderUserKey.Equals(y.ProviderUserKey);
        }

        public int GetHashCode(Member obj)
        {
            return obj.ProviderUserKey.GetHashCode();
        }

        #endregion
    }
    public class MemberEmailComparer : IEqualityComparer<Member>
    {
        #region IEqualityComparer<Member> Members

        public bool Equals(Member x, Member y)
        {
            return x.Email.Equals(y.Email);
        }

        public int GetHashCode(Member obj)
        {
            return obj.Email.GetHashCode();
        }

        #endregion
    }
}
